package com.plian.system.dto.zzd;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Pattern;

@Data
@ApiModel(value = "ZZDFinanceQuery",description = "浙政钉-融资-查询query")
public class ZZDFinancingQuery {

    private String orgId;

    @Pattern(regexp = "^\\d{4}-((0([1-9]))|(1(0|1|2)))$", message = "统计日期格式错误", groups = {ZZDFinancingQuery.CodeQueryGroup.class, ZZDFinancingQuery.OrverviewQueryGroup.class})
    @NotBlank(message = "开始日期为空", groups = {ZZDFinancingQuery.CodeQueryGroup.class, ZZDFinancingQuery.OrverviewQueryGroup.class})
    @ApiModelProperty("开始日期 2020-01 默认当前时间")
    private String startDate;

    @Pattern(regexp = "^\\d{4}-((0([1-9]))|(1(0|1|2)))$", message = "统计日期格式错误" , groups = {ZZDFinancingQuery.CodeQueryGroup.class, ZZDFinancingQuery.OrverviewQueryGroup.class})
    @NotBlank(message = "结束日期为空", groups = {ZZDFinancingQuery.CodeQueryGroup.class, ZZDFinancingQuery.OrverviewQueryGroup.class})
    @ApiModelProperty("结束日期 2020-01 默认当前时间")
    private String endDate;

    @NotBlank(message = "属性值为空", groups = ZZDFinancingQuery.CodeQueryGroup.class)
    @ApiModelProperty("属性值为融资总览各指标columnName")
    private String code;

    public interface CodeQueryGroup {
    }

    public interface OrverviewQueryGroup {
    }

}
